package com.xiaoxi.bms.common.constant.enumeration.statuscode.other;


import com.xiaoxi.bms.common.constant.enumeration.statuscode.ParentEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName CommonEnums
 * @Description
 * @Author xiaoxi
 * @Date 2022/7/11 0:29
 * @Version 1.0
 */
public enum CommonEnums implements ParentEnum {

    INFORMATION_OUT_OF_DATE("C500", "信息已过期,请刷新页面"),
    PLEASE_SEND_THE_VERSION("C501", "未携带版本号");

    private final String code;
    private final String message;

    CommonEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public Map<String, String> format() {
        Map<String, String> enumData = new HashMap<>();
        enumData.put("code", this.code);
        enumData.put("message", this.message);
        return enumData;
    }
}
